#ifndef UTRANSFERWIDGET_H
#define UTRANSFERWIDGET_H

#include "utkwidget_export.h"

#include <QWidget>
#include <QModelIndex>

class QStandardItemModel;
class UTransferWidgetPrivate;
class UTKWIDGET_EXPORT UTransferWidget : public QWidget
{
    Q_OBJECT
public:
    explicit UTransferWidget(QWidget* parent = Q_NULLPTR);
    ~UTransferWidget() Q_DECL_OVERRIDE;

    void setLeftTitle(const QString &name);

    void setRightTitle(const QString &name);

    QModelIndexList leftSelectModelIndex() const;

    QModelIndexList rightSelectModelIndex() const;

    QStandardItemModel* leftModel();

    QStandardItemModel* rightModel();

    void setLeftColumnWidth(const QList<int> &widths);

    void setRightColumnWidth(const QList<int> &widths);

    void updateHeaderCheckStatus();

private slots:
    void onSyncLeftData();

    void onSyncRightData();

private:
    QScopedPointer<UTransferWidgetPrivate> d_ptr;
    Q_DISABLE_COPY(UTransferWidget)
    Q_DECLARE_PRIVATE_D(d_ptr, UTransferWidget)
};

#endif // UTRANSFERWIDGET_H
